package com.cw.dubbo.consumer;


import cn.hutool.json.JSONUtil;
import com.cw.dubbo.api.LoginService1;
import com.cw.dubbo.api.LoginService2;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.HashMap;
import java.util.Map;

@DubboService
public class LoginService2Impl implements LoginService2 {

    @Override
    public String login(String name, String pwd) {
        Map<String, String> map = new HashMap<>(){{
            put("username", name);
            put("password", pwd);
        }};
        return JSONUtil.toJsonStr(map);
    }

}

